<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Lesson 2.2</title>
</head>
<body>
<script>
  var Book = function (id, bookname, price) {
    this.id = id;
    this.bookname = bookname;
    this.price = price;
  }
  Book.prototype = {
    display : function () {
      //展示这本书
    }
  }
  var book = new Book('1', 'Javascript设计模式', '59');
  console.log(book.bookname);
  console.log(book.__proto__ == Book.prototype); // true
  console.log(book.__proto__.constructor == Book); // false



</script>
</body>
</html>